<?php

/*

   Aiesec's Alumni System - to manage data about Aiesec's Alumni and
   optimize the knowledge exchange between old and new members.
   Copyright (C) 2009 Vinicius Stein Dani

   This program is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License
   as published by the Free Software Foundation; either version 2
   of the License, or (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

*/

/*
  
   Author: Vinicius Stein Dani
   Contact: viniciussdani@gmail.com
   Today is: May 25, 2009
   Location at this present moment: Santa Maria - RS - Brasil
  
*/
  
  SESSION_START();

	include_once '_v_geral.php'; 
	
	$login_usuario = $_SESSION['login_usuario'];
	$senha_usuario = $_SESSION['senha_usuario'];

	$verifica_usuario = mysql_query("SELECT * FROM person WHERE email = '$login_usuario' AND password = '$senha_usuario'");
	$conta_usuario = mysql_num_rows( $verifica_usuario );
	
	if($conta_usuario > 0)
	{
	  $mostra_usuario = mysql_fetch_array($verifica_usuario);
	  $_SESSION['admin'] = $mostra_usuario['admin'];
	  $_SESSION['id_person'] = $mostra_usuario['id_person'];
	  
	  $tipo_usuario = $_SESSION['admin'];
	}
 
?>